class Weapon:
    def __init__(self, name, atk_hp):
        self.name = name
        self.atk_hp = atk_hp

    def buy(self):
        print("您购买了" + self.name)

    def atk(self):
        pass


class Gun(Weapon):
    def __init__(self, atk_hp, shoot_speed):
        self.shoot_speed = shoot_speed
        super().__init__("枪", atk_hp)

    def atk(self):
        print('%s攻击对方%s血量' % (self.name, self.atk_hp))


class Grenade(Weapon):
    def __init__(self, atk_hp, explode_range):
        self.explode_range = explode_range
        super().__init__("手雷", atk_hp)

    def atk(self):
        print('%s攻击对方%s血量' % (self.name, self.atk_hp))


class Enemy:
    def __init__(self, *args):
        for item in args:
            item.atk()


enemy = Enemy(Gun('10', 100), Grenade('20', 70))
